#pragma once
#ifndef Game_GraphicsPipeline_GraphicsPipeline11_h
#define Game_GraphicsPipeline_GraphicsPipeline11_h

#include "GraphicsPipelineBase.h"

namespace Game {
namespace GraphicsPipeline {

class GraphicsPipeline11 : public GraphicsPipelineBase {
public:
    GraphicsPipeline11(ID3D11Device* d3dDevice);
    virtual ~GraphicsPipeline11();

    virtual void Finalize();
    virtual void Initialize();
    void FrameRender(ID3D11Device* pd3dDevice, ID3D11DeviceContext* pd3dImmediateContext, const double& fTime, const float& fElapsedTime);

    static void CALLBACK D3D11FrameRenderCallback(ID3D11Device* pd3dDevice, ID3D11DeviceContext* pd3dImmediateContext, double fTime, float fElapsedTime, void* pUserContext);
    static void CALLBACK D3D11SwapChainReleasingCallback(void* pUserContext);
    static HRESULT CALLBACK D3D11SwapChainResizedCallback(ID3D11Device* pd3dDevice, IDXGISwapChain* pSwapChain, const DXGI_SURFACE_DESC* pBackBufferSurfaceDesc, void* pUserContext);
private:
    ID3D11Device* d3dDevice;

    void OnSwapChainReleasing();
    HRESULT OnSwapChainResized(ID3D11Device* pd3dDevice, IDXGISwapChain* pSwapChain, const DXGI_SURFACE_DESC* pBackBufferSurfaceDesc);
};

}

}

#endif